Skip to content

API refactoring #438

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 141 commits into
base: master
Choose a base branch
from
Open

API refactoring #438

wants to merge 141 commits into from

Conversation

allnes
Copy link
Member

@allnes allnes commented Jun 8, 2025

No description provided.

allnes added 30 commits May 18, 2025 00:24
…_programming_course into an/unite-tests

# Conflicts:
#	.github/workflows/codeql.yml
#	.github/workflows/main.yml
#	.github/workflows/static-analysis-pr.yml
#	modules/core/task/src/task.cpp
Refactored test parameter structs and macros to enhance readability and flexibility, including the addition of `FuncTestParam` and `PerfTestParam` types. Updated test case naming conventions with custom functions for better identification. Simplified utility functions and macros for improved code maintainability.
Updated functional tests and scripts to support dynamically filtering tasks by type. Refactored execution logic to reduce redundancy and improve maintainability. Adjusted macros and utility functions for better namespace resolution.
Standardized line formatting in test definitions and Python scripts. Adjustments enhance code readability without altering functionality or behavior.
Simplify `ExecuteTest` by encapsulating parameters into a single struct. This reduces redundancy and improves code readability across test execution functions. Updated affected test cases to align with the new parameter structure.
Replaced direct handling of task pointers with BaseRunFuncTests for cleaner and reusable test logic. Renamed kAddParams to kTestParams for better semantic clarity. Improved test output validation by overriding CheckTestOutputData in derived test classes.
Extracted data preparation logic into a dedicated function for better readability and modularization. Introduced a new input member in the base test class to streamline test input management. Adjusted lambda and tuple type naming for consistency and clarity.
Refactored the `BaseRunFuncTests` class to simplify and improve test execution and data handling. Replaced `GetTestInput` and `GetTaskPtr` with `GetTestInputData` and `CheckTestOutputData` for cleaner abstraction. Updated error handling and validation logic for better test reliability and maintainability.
Replaced hardcoded task tuples with dynamic generation using templates for better scalability and reusability. Added utility functions to simplify tuple expansion for test parameterization, improving code maintainability.
Replaced inline TestParamInfo definitions with the GTestFuncParam alias to improve readability and maintainability. This ensures consistent usage of type aliases across the codebase and reduces redundancy in test parameter handling.
Renamed `DEFINE_GEN_TASK_TUPLES` to `DEFINE_GEN_TASK` and updated associated functions to streamline task generation. Simplified code structure by adjusting macro usage and wrapping test cases in an anonymous namespace for better encapsulation.
Updated task class names across all modules to follow the NesterovATestTask* naming convention. Renamed the `FuncTestParamIndex` enum to `TestParamIndex` for consistency. Adjusted related function definitions and testing suits accordingly.
Simplified the `FuncTestParam` type usage by removing redundant namespace prefixes and updated the test name generation logic for better reuse. Introduced a static interface requirement and concept check to ensure derived classes implement `PrintTestParam`. These changes improve code readability and enforce clearer contracts for test classes.
allnes added 3 commits June 15, 2025 00:48
… `${PPC_ENVPP_LIB_NAME}` and `${PPC_FMT_LIB_NAME}` for streamlined dependency management.
…_programming_course into an/unite-tests

# Conflicts:
#	.github/workflows/main.yml
#	modules/core/perf/src/perf.cpp
- Consolidate `PPC_NUM_PROC` environment variable setup for functional and performance tests.
- Standardize CMake configuration by deduplicating `-G Ninja` specification.
- Update gcovr exclusions for more precise coverage reporting.
- Add LLVM setup for Windows workflows to ensure correct compiler configuration.
allnes added 2 commits June 16, 2025 16:07
- Update `codecov.yml` and GitHub workflow exclusions for improved coverage and build precision.
- Add new parameterized and edge case tests for utility and task-related functionality.
- Standardize and clean up `NOLINT` macros in `util.hpp`.
- Improve test readability by removing redundant comments and enhancing structure.
- Extend `GetStringTaskType` tests with additional scenarios and file-based validation cases.
- Introduce `GetNamespaceTest` for namespace extraction validations.
- Enforce `CMAKE_CXX_STANDARD` and `CMAKE_CXX_STANDARD_REQUIRED` across all relevant submodules (`onetbb`, `libenvpp`, `json`, `gtest`).
- Replace `DEATH_TEST` with `TEST_NOLINT` and introduce consistent `NOLINT` test macro variants (`ASSERT_DEATH_IF_SUPPORTED_NOLINT`, `TYPED_TEST_NOLINT`, etc.).
- Update affected test cases in `task_tests.cpp`, `perf_tests.cpp`, and `util.hpp`.
- Enhance `GetNamespaceTest` consistency with variable naming improvements.
- Include missing `util.hpp` in performance tests and clean up redundant includes.
allnes added 5 commits June 17, 2025 10:21
- Replace enum casts with strongly-typed `enum class` constants.
- Introduce `TEST_NOLINT` for improved macro consistency.
- Extend includes for task-related and JSON utilities.
- Standardize test case names and improve edge case handling.
- Simplify `NOLINT` macros in `util.hpp` by removing redundant `NOLINTBEGIN` and `NOLINTEND` comments.
- Replace `nlohmann::json` with `ppc::util::InitJSONPtr` in `perf_tests.cpp` for consistency.
- Remove unused JSON include in `perf_tests.cpp`.
- Introduce type aliases for `nlohmann::json` exceptions in `util.hpp` for improved readability.
- Update test cases in `perf_tests.cpp` to use the new aliases for exception handling consistency.
- Replace `INSTANTIATE_TEST_SUITE_P_NOLINT` with `INSTANTIATE_TEST_SUITE_P_WITH_NAME` across functional and performance test cases.
- Add new `INSTANTIATE_TEST_SUITE_P_WITH_NAME` macro in `util.hpp` for improved consistency and clarity.
allnes added 5 commits June 17, 2025 14:25
- Adjust `--show-leak-kinds` to `definite` for focused leak reporting.
…with `INSTANTIATE_TEST_SUITE_P_WITH_NAME` to enhance test naming clarity.
- Refine Valgrind command to use `--show-leak-kinds=all` for broader leak reporting.
- Add `PrintTo` functions in `perf_tests.cpp` to enhance test output readability.
@allnes allnes force-pushed the an/unite-tests branch 2 times, most recently from 4bdc69a to f6b3af2 Compare June 17, 2025 16:24
…er encapsulation. Add missing `<ostream>` include.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants